import axios from '@/utils/axios'

export function getAuthPage(params) {
  return axios({
    url: '/authority/page',
    method: 'get',
    params
  })
}

export function getAuthList() {
  return axios({
    url: '/authority/list',
    method: 'get'
  })
}

export function createAuth(data) {
  return axios({
    url: '/authority',
    method: 'post',
    data
  })
}

export function updateAuth(data) {
  return axios({
    url: '/authority/update',
    method: 'post',
    data
  })
}

export function deleteAuthById(id) {
  return axios({
    url: '/authority/d_' + id,
    method: 'get'
  })
}

export function updateStateById(id) {
  return axios({
    url: '/authority/s_' + id,
    method: 'get'
  })
}
